//
//  ZSY_FourViewController.m
//  ZSY_BreadTrip
//
//  Created by 张诗宇 on 16/1/4.
//  Copyright © 2016年 张诗宇. All rights reserved.
//

#import "ZSY_FourViewController.h"
#import "UMSocial.h"


@interface ZSY_FourViewController ()

@property (nonatomic, retain) UIWebView *webView;

@end

@implementation ZSY_FourViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CGRect frame = self.view.frame;
    frame.size.height -= 64;
    
    self.webView = [[UIWebView alloc] initWithFrame:frame];
    
    NSURL *url = [NSURL URLWithString:self.url];
    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
    [self.webView loadRequest:request];
    
    [self.view addSubview:self.webView];
    [_webView release];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"add_new_poi_back_btn"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(backAction:)];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"iconfont-share"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(shareButtonAction:)];
    
    
    
}
#pragma mark - 分享按钮
- (void)shareButtonAction:(UIBarButtonItem *)button {
    
    //注意：分享到微信好友、微信朋友圈、微信收藏、QQ空间、QQ好友、来往好友、来往朋友圈、易信好友、易信朋友圈、Facebook、Twitter、Instagram等平台需要参考各自的集成方法
    [UMSocialSnsService presentSnsIconSheetView:self appKey:@"5694e85267e58e8e770009cb" shareText:@"分享" shareImage:nil shareToSnsNames:nil delegate:nil];
}

- (void)backAction:(UIButton *)button {
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
